<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ActivityShareRecords extends Model
{
    protected $table = 'activity_share_records';

    public function user(){

        return $this->belongsTo('App\User','user_id');
    }

    public function getOneNumber($id){

        return $this->where('fission_id',$id)->count();
    }

    public function getUser($id){
        return $this->where('fission_id',$id)->get();
    }

    public function getTwoNumber($id){
        return $this->where('fission_id',$id)->count();
    }
}
